<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css" />
		<link rel="stylesheet" type="text/css" href="../../css/style.css" />
		<style type="text/css">
			html,body { background:#F7F8FA }
			.text-center { text-align: center !important; }
			.text-center button { display:block; margin:0 auto; margin-top: 35px; border: 0; width: 130px; height: 40px; background-color: #3262F1; border-radius: 8px; color: #fff; font-size: 13px;}
			
		</style>
	</head>
	<body>
		<div class="text-center" style="padding: 150px 0 !important;" id="divnodata">
			<div class="text-center"><img src="../../image/nonetwork.png" style="margin:0 auto;width:277px;height:auto;"></div>
			<div class="text-center" style="font-size:12px;color:#808080;margin-top:30px;">网络不给力，请刷新重试！</div>
			<button tapmode="btnpress" onclick="reloadpage()">重新加载</button>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/app.js"></script>
	<script type="text/javascript">
		apiready = function() {
			api.parseTapmode();
			api.addEventListener({
				name:'online'
			}, function(ret, err){        
				toast('已连接到网络');
				reload();
			});
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				api.toast({
					msg : '再点一下退出应用',
					duration : 2000,
					location : 'bottom'
				});
				api.addEventListener({
					name : 'keyback'
				}, function(ret, err) {
					api.closeWidget({
						silent : true
					});
				});
				setTimeout(function() {
					exitApp();
				}, 2000)
			});
		}
		function exitApp() {
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				api.toast({
					msg : '再点一下退出应用',
					duration : 2000,
					location : 'bottom'
				});
				api.addEventListener({
					name : 'keyback'
				}, function(ret, err) {
					api.closeWidget({
						id : api.appId,
						retData : {
							name : 'closeWidget'
						},
						silent : true
					});
				});
				setTimeout(function() {
					exitApp();
				}, 3000)
			});
		}
		function reloadpage() {

		}
		function reload() {
			api.sendEvent({
				name : 'reloadpage'
			});
			api.closeWin({
			});
		}
		function closeframe() {
			api.closeFrame({
				name: api.frameName
			});
		}
	</script>
</html>
